package factory;

import java.util.Scanner;

public class Producer {

    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        System.out.println("---请选择需要生产的汽车品牌，如:BMW，benz，audi---");
        // 读取输入的字符串
        String inputString = scanner.nextLine();
        scanner.close();
        Car car = FactoryType.fromType(inputString).getFactoryFunction().produce();
        car.drive();
    }


}
